<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='lb'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">

            <div class="layui-form-item">
                <form name="totalForm" id="totalForm" method="get">

                    <div class="layui-inline">
                        <label class="layui-form-label"><fmt:message key='ztmc'/></label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" value="${params.name}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label"><fmt:message key='ztms'/></label>
                        <div class="layui-input-inline">
                            <input type="text" name="description" value="${params.description}" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-sm layuiadmin-btn-list" id="search"><i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> <fmt:message key='ss'/></button>
                    </div>
                </form>
            </div>
        </div>

    </div>

    <div class="layui-card">
        <div class="layui-field-box layui-form">

            <table class="layui-table layui-form" lay-size="sm">
                <thead>
                <tr>
                    <th></th>
                    <th><fmt:message key='xh'/></th>
                    <th><fmt:message key='ztmc'/></th>
                    <th><fmt:message key='ztms'/></th>
                    <th><fmt:message key='ztmb'/></th>
                    <th><fmt:message key='cjsj'/></th>
                </tr>
                </thead>
                <c:forEach items="${page.result}" var="item" varStatus="status">
                    <tr>
                        <td><input type="checkbox" value="${item.id}" data-name="${item.name}" class="feijin-check" lay-ignore lay-skin="primary"/></td>
                        <td>${status.index + 1}</td>
                        <td>${item.name }</td>
                        <td>${item.description}</td>
                        <td>${item.templateName}</td>
                        <td><fmt:formatDate value="${item.createTime}" type="both"/></td>
                    </tr>
                </c:forEach>
            </table>
            <jsp:include page="/commons/page.jsp" flush="true"/>
        </div>
    </div>

</div>

<script>


    layui.use(['form', 'laydate'], function () {

        $("input[type=checkbox]").change(function () {
            if (this.checked) {
                $(this).parent().parent().siblings().find("input[type=checkbox]").prop("checked", false);
            }
        });

    });

</script>
</body>
</fmt:bundle>
</html>
